<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
         width: 300px;
         height: 300px;
         border: 1px solid #000;
         /* 弹性容器 */
         display: flex;

         /* 1-主轴默认 */
         /* justify-content: flex-start; */
         /* 反方向排序 */
         /* justify-content: flex-end; */
         /* 居中 */
         /* justify-content: center; */
         /* 2比1 的比例 */
         /* justify-content: space-around; */
         /* 1比1 的比例 */
         /* justify-content: space-evenly; */
         /* 两侧靠边,中间自适应 */
         justify-content: space-between;

         /* 2-侧轴上 */
         /* align-items: flex-start; */
         /* 下 */
         /* align-items: flex-end; */
         /* 中 */
         /* align-items: center; */
         /* 拉满 */
         /* align-items: stretch; */

         /* 3-换行 */
         flex-wrap: wrap;

         /* 4-切换主轴(column是列,row是行) */
         /* flex-direction: column; */
         /* X轴反向排列 */
         /* flex-direction: row-reverse; */
         /* Y轴反向排列 */
         /* flex-direction: column-reverse; */

         /* 5-多行排列 */
         /* align-content: start; */
         /* 从下排列 */
         /* align-content: flex-end; */
         /* 居中排列 */
         /* align-content: center; */
         /* 2比1排列 */
         /* align-content: space-around; */
         /* 上下对齐 */
         align-content: space-between;

        }

        .box div{
         width: 50px;
         height: 40px;
         background-color: rgb(115, 86, 86);
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
        <div>7</div>
        <div>8</div>
    </div>
</body>
</html>